package com.vizhuo.client.business.meb.mebacc.vo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import com.vizhuo.client.base.AbstractVo;
import com.vizhuo.client.util.ClientUtil;

/**
 * @author luzh
 * @date 创建时间：2015年6月29日 下午4:10:58
 * @version 1.0
 * @parameter
 * @since
 * @return
 */
public class MebInfoVo extends AbstractVo implements Serializable {

    /**
     * id
     */
    private Integer id;

    /**
     * 
     */
    private static final long serialVersionUID = -2709486367258398816L;

    /**
     * 物流公司名称
     */
    private String name;

    /**
     * 联系方式
     */
    private String phone;

    /**
     * 认证状态（身份认证）
     */
    private String checkFlag;

    /**
     * 认证失败项目集合(字符串)
     */
    private String checkFlagItemsStr;

    /**
     * 认证状态(说明）
     */
    private String checkFlagRemark;

    /**
     * 来源
     */
    private String sourceCode;

    /**
     * 介绍人
     */
    private String referrer;

    /**
     * 头像照片路径
     */
    private String headPicPath;

    /**
     * 头像照片名称
     */
    private String headPicName;

    /**
     * 联系人
     */
    private String contantUser;

    /**
     * 百度经度
     */
    private String bdLng;

    /**
     * 百度维度
     */
    private String bdLat;

    /**
     * 省编码
     */
    private String provinceCode;

    /**
     * 市编码
     */
    private String cityCode;

    /**
     * 区编码
     */
    private String countryCode;

    /**
     * 省名称
     */
    private String provinceName;

    /**
     * 市名称
     */
    private String cityName;

    /**
     * 区名称
     */
    private String countryName;

    /**
     * 详细地址
     */
    private String addr;

    /**
     * 数据认领状态
     */
    private String dataFlag;

    /**
     * 身份类型
     */
    private String identityType;

    /**
     * 登录账号实体类信息，只是为了方便用于客户端展示信息使用
     */
    private MebAccVo mebAcc;

    /**
     * 营业执照
     */
    private String licensePicPath;

    private String licensePicName;

    /**
     * 门头照片
     */
    private String shopPicPath;

    private String shopPicName;

    /**
     * 真实姓名
     */
    private String nameReal;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 好评率
     */
    private BigDecimal highPraiseRate;

    /**
     * 成单数量
     */
    private Integer orderEndCount;

    /**
     * 投诉量
     */
    private Integer complaintNums;

    public Integer getComplaintNums() {
        return complaintNums == null ? 0 : complaintNums;
    }

    public void setComplaintNums(Integer complaintNums) {
        this.complaintNums = complaintNums;
    }

    private List<MebRunLineVo> mebRunLineList;

    /**
     * 物流公司提供的服务 码（逗号分隔）
     * 
     */
    private String services;// 是一个字符串，服务项目以,隔开

    /**
     * 物流公司提供的服务 名称（逗号分隔）
     */
    private String servicesLabel;

    private Integer MebAccId;

    public Integer getMebAccId() {
        return MebAccId;
    }

    public void setMebAccId(Integer mebAccId) {
        MebAccId = mebAccId;
    }

    public String getServices() {
        return services;
    }

    public void setServices(String services) {
        this.services = services;
    }

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return ClientUtil.str(phone);
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCheckFlag() {
        return checkFlag;
    }

    public void setCheckFlag(String checkFlag) {
        this.checkFlag = checkFlag;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public String getReferrer() {
        return referrer;
    }

    public void setReferrer(String referrer) {
        this.referrer = referrer;
    }

    public String getHeadPicPath() {
        return headPicPath;
    }

    public void setHeadPicPath(String headPicPath) {
        this.headPicPath = headPicPath;
    }

    public String getHeadPicName() {
        return headPicName;
    }

    public void setHeadPicName(String headPicName) {
        this.headPicName = headPicName;
    }

    public String getContantUser() {
        return contantUser;
    }

    public void setContantUser(String contantUser) {
        this.contantUser = contantUser;
    }

    public String getBdLng() {
        return bdLng;
    }

    public void setBdLng(String bdLng) {
        this.bdLng = bdLng;
    }

    public String getBdLat() {
        return bdLat;
    }

    public void setBdLat(String bdLat) {
        this.bdLat = bdLat;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getDataFlag() {
        return dataFlag;
    }

    public void setDataFlag(String dataFlag) {
        this.dataFlag = dataFlag;
    }

    public String getIdentityType() {
        return identityType;
    }

    public void setIdentityType(String identityType) {
        this.identityType = identityType;
    }

    public MebAccVo getMebAcc() {
        return mebAcc;
    }

    public void setMebAcc(MebAccVo mebAcc) {
        this.mebAcc = mebAcc;
    }

    public String getNameReal() {
        return nameReal == null ? "" : nameReal;
    }

    public void setNameReal(String nameReal) {
        this.nameReal = nameReal;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public List<MebRunLineVo> getMebRunLineList() {
        return mebRunLineList;
    }

    public void setMebRunLineList(List<MebRunLineVo> mebRunLineList) {
        this.mebRunLineList = mebRunLineList;
    }

    public String getLicensePicPath() {
        return licensePicPath;
    }

    public void setLicensePicPath(String licensePicPath) {
        this.licensePicPath = licensePicPath;
    }

    public String getLicensePicName() {
        return licensePicName;
    }

    public void setLicensePicName(String licensePicName) {
        this.licensePicName = licensePicName;
    }

    public String getShopPicPath() {
        return shopPicPath;
    }

    public void setShopPicPath(String shopPicPath) {
        this.shopPicPath = shopPicPath;
    }

    public String getShopPicName() {
        return shopPicName;
    }

    public void setShopPicName(String shopPicName) {
        this.shopPicName = shopPicName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }

    public BigDecimal getHighPraiseRate() {
        return highPraiseRate;
    }

    public String findHighPraiseRateStr() {
        if (highPraiseRate != null) {
            return highPraiseRate.multiply(new BigDecimal(100)).intValue() + "%";
        } else {
            return "0%";
        }
    }

    public void setHighPraiseRate(BigDecimal highPraiseRate) {
        this.highPraiseRate = highPraiseRate;
    }

    public Integer getOrderEndCount() {
        return orderEndCount == null ? 0 : orderEndCount;
    }

    public void setOrderEndCount(Integer orderEndCount) {
        this.orderEndCount = orderEndCount;
    }

    @Override
    public String toString() {
        return "MebInfoVo [id=" + id + ", name=" + name + ", phone=" + phone + ", checkFlag=" + checkFlag
                + ", sourceCode=" + sourceCode + ", referrer=" + referrer + ", headPicPath=" + headPicPath
                + ", headPicName=" + headPicName + ", contantUser=" + contantUser + ", bdLng=" + bdLng + ", bdLat="
                + bdLat + ", provinceCode=" + provinceCode + ", cityCode=" + cityCode + ", countryCode=" + countryCode
                + ", provinceName=" + provinceName + ", cityName=" + cityName + ", countryName=" + countryName
                + ", addr=" + addr + ", dataFlag=" + dataFlag + ", identityType=" + identityType + ", mebAcc=" + mebAcc
                + ", licensePicPath=" + licensePicPath + ", licensePicName=" + licensePicName + ", shopPicPath="
                + shopPicPath + ", shopPicName=" + shopPicName + ", nameReal=" + nameReal + ", idCard=" + idCard
                + ", highPraiseRate=" + highPraiseRate + ", orderEndCount=" + orderEndCount + ", mebRunLineList="
                + mebRunLineList + "]";
    }

    public String getCheckFlagRemark() {
        return checkFlagRemark;
    }

    public void setCheckFlagRemark(String checkFlagRemark) {
        this.checkFlagRemark = checkFlagRemark;
    }

    public String getCheckFlagItemsStr() {
        if (checkFlagItemsStr != null && checkFlagItemsStr.startsWith(",")) {
            checkFlagItemsStr = checkFlagItemsStr.substring(1);
        }

        if (checkFlagItemsStr != null && checkFlagItemsStr.endsWith(",")) {
            checkFlagItemsStr = checkFlagItemsStr.substring(0, checkFlagItemsStr.length() - 1);
        }
        return checkFlagItemsStr;
    }

    public void setCheckFlagItemsStr(String checkFlagItemsStr) {
        this.checkFlagItemsStr = checkFlagItemsStr;
    }

    public String getServicesLabel() {
        return servicesLabel;
    }

    public void setServicesLabel(String servicesLabel) {
        this.servicesLabel = servicesLabel;
    }

}
